package com.ruoyi.applet.enums;

import cn.hutool.core.util.ObjectUtil;
import lombok.Getter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter
public enum AppletEnum {

    APPLET(1, "小程序"),
    H5(0, "H5"),
    APP(2, "app")
    ;

    private Integer value;
    private String name;

    AppletEnum(Integer value, String name){
        this.value = value;
        this.name = name;
    }

    public static List<Map<String, Object>> getStatusTypeMapList(){
        List<Map<String, Object>> resultList = new ArrayList<>();
        for (AppletEnum appletEnum : values()) {
            Map<String, Object> itemMap = new HashMap<>();
            itemMap.put("key", appletEnum.getName());
            itemMap.put("value", appletEnum.getValue());
            resultList.add(itemMap);
        }
        return resultList;
    }


}
